﻿using _03_属性通知更改.Commands;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace _03_属性通知更改.ViewModels;

public class MainViewModel : ViewModelBase
{
    public MyCommand ShowCommand { get; set; }

    private string? _message;
    public string? Message
    {
        get { return _message; }
        set
        {
            _message = value;
            OnPropertyChanged();
        }
    }

    public MainViewModel()
    {
        ShowCommand = new MyCommand(Show);
    }

    public void Show()
    {
        Message = "接到通知";
    }
}
